from sklearn import svm
import algorithm as al
import numpy as np
from sklearn import datasets
from sklearn.model_selection import cross_val_score

# p = ['a5', 'a9', 'a6', 'a1', 'a13', 'a4', 'a11']
# df = al.dataInput('credit.xlsx')

p = ['a12', 'a35']
df = al.dataInput('anneal.xlsx')

X = df[p].values
y = df['tag'].values
clf = svm.SVC(kernel='linear', C=1)
scores = cross_val_score(clf, X, y, cv=10, scoring='accuracy')
print(scores)
print(scores.mean())

